import numpy as np

class SignalGenerator:
    def __init__(self):
        """
        初始化信号生成器
        """
        pass
        
    def generate_reference(self, t):
        """
        生成参考信号
        
        Args:
            t: 时间
            
        Returns:
            reference: 参考信号值
        """
        freq = 2.0
        if t < freq/4:
            return np.sin(2 * freq * np.pi * t)
        else:
            return 0.0